// NutriStat 
// Erik Knudsen
// 
// ----------------------------------------------------------------------------
// PURPOSE: This object has been deprecated.
// ----------------------------------------------------------------------------
//
using System;
using System.Collections.Generic;
using System.Text;

namespace NutriStat
{
    public class Measurement
    {
        // user inputs
        private string  m_sDateOfMeasurement;
        private decimal m_dAgeMonths;
        private decimal m_dHeightInches;
        private decimal m_dWeightPounds;
        private decimal m_dMUAC;            // in inches

        private int     m_iSystolic;        // for future usage
        private int     m_iDiastolic;       // for future usage

        private bool    m_bEdema;

        // program outputs
        private decimal m_dBMI;

        private decimal m_dHeightForAgePercentile;
        private decimal m_dWeightForAgePercentile;
        private decimal m_dWeightForHeightPercentile;
        private decimal m_dBMIPercentile;

        private decimal m_dHeightForAgeZ;
        private decimal m_dWeightForAgeZ;
        private decimal m_dWeightForHeightZ;        

        private decimal m_dHeightForAgeFlag;
        private decimal m_dWeightForAgeFlag;
        private decimal m_dWeightForHeightFlag;
        private decimal m_dBMIFlag;

        private decimal m_dMUAC_Z_Age;
        private decimal m_dMUAC_Z_Height;

        private string  m_sNotes;

        public Measurement() 
        {
            m_sDateOfMeasurement = "";
            m_dAgeMonths = 0m;
            m_dHeightInches = 0m;
            m_dWeightPounds = 0m;
            m_dMUAC = 0m;

            m_iSystolic = 0;
            m_iDiastolic = 0;

            m_bEdema = false;
        } // end default constructor

        // ----------------------------------
        // Function description: A method to get and set the
        //      edema property
        // ----------------------------------
        public bool Edema
        {
            get
            {
                return m_bEdema;
            } // end get

            set
            {
                m_bEdema = value;
            }// end set

        } // end Edema


        // ----------------------------------
        // Function description: A method to get and set the
        //      child's weight
        // ----------------------------------
        public decimal Weight
        {
            get
            {
                return m_dWeightPounds;
            } // end get

            set
            {
                // our child can't be more than 800 pounds
                if ( value > 800m )
                {
                    m_dWeightPounds = 800m;
                }
                // if zero weight, how can we have a child?
                else if ( value < 1 )
                {
                    m_dWeightPounds = 1;
                }
                else
                {
                    m_dWeightPounds = value;
                }
                
            }// end set

        } // end Weight


        // ----------------------------------
        // Function description: A method to get and set the
        //      child's height
        // ----------------------------------
        public decimal Height
        {
            get
            {
                return m_dHeightInches;
            } // end get

            set
            {
                // our child can't be more than 80 inches
                if ( value > 80m )
                {
                    m_dHeightInches = 80m;
                }
                // if zero height, child must not exist...
                else if ( value < 1 )
                {
                    m_dHeightInches = 1;
                }
                else
                {
                    m_dHeightInches = value;
                }
                
            }// end set

        } // end Height

    } // end class

} // end namespace

